<template>
	<!-- 加盟公告 -->
	<view class="container padding-bj">
		<view class="mian">
			<rich-text :nodes="data.content" style="width: 100%;"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: [{
					text: "宠物超市宠物超市宠物超市",
					Image: "../../../static/images/default/act-3.png",
				}]
			};
		},
		onLoad() {
			// 加载列表
			this.$api.post({
				url: '/wanlshop/article/getList',
				data: {
					category: '加盟'
				},
				success: res => {
					//详情正则
					res.data[0].content = res.data[0].content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, (match,
						capture) => {
						var img =
							`<img style="display: block; max-width: 100%;" src="${this.$wanlshop.oss(capture, 500, 0)}">`;
						return img;
					});
					this.data = res.data[0];
					// console.log('加盟', res.data)
				}
			})
		}
	}
</script>

<style>
</style>